#pragma once

struct Realm
{
	uint32 id;
	std::string name, address;
	uint8 type, icon;
	float population;
	uint8 timeZone;
};

class RealmHandler : public Singleton<RealmHandler>
{
	Mutex mLock;
	std::map<uint32, Realm> mRealms;
public:
	void addRealm(Realm& rlm) {
		mLock.acquire();
		mRealms[rlm.id] = rlm;
		mLock.release();
	}
	void removeRealm(Realm& rlm);
	void addRealms(ByteBuffer& packet);
};

#define sRealmHandler (RealmHandler::getInstance())